package com.xx.pmis.services.implementations;

import java.util.List;

import com.xx.pmis.model.SubjectSon;
import com.xx.pmis.persistence.dao.SubjectSonDAO;
import com.xx.pmis.services.SubjectSonService1;

public class SubjectSonServiceImpl1 implements SubjectSonService1 {
	SubjectSonDAO subjectSonDAO = null;

	public SubjectSonServiceImpl1(SubjectSonDAO subjectSonDAO) {
		super();
		this.subjectSonDAO = subjectSonDAO;
	}

	public void saveOrUpdateSubjectSon(SubjectSon subjectSon) throws Exception {
		subjectSonDAO.saveOrUpdate(subjectSon);
	}

	public void saveSubjectSon(SubjectSon subjectSon) throws Exception {
		subjectSonDAO.save(subjectSon);
	}

	public void deleteSubjectSon(SubjectSon subjectSon) throws Exception {
		subjectSonDAO.delete(subjectSon);
	}

	public SubjectSon getSubjectSonBySubjectSonID(String ssID) throws Exception {
		SubjectSon subjectSon = subjectSonDAO.getSubjectSonBySubjectSonID(ssID);
		return subjectSon;
	}

	public List<SubjectSon> getAllSubjectSon() throws Exception {
		List<SubjectSon> subjectSons = subjectSonDAO.getAllSubjectSon();
		return subjectSons;
	}

	public SubjectSon getSubjectSonBySubjectSonName(String ssName) throws Exception {
		SubjectSon subjectSon = subjectSonDAO.getSubjectSonBySubjectSonName(ssName);
		return subjectSon;
	}

	public SubjectSon getSubjectSonBySubjectSonCode(String ssCode) throws Exception {
		SubjectSon subjectSon = subjectSonDAO.getSubjectSonBySubjectSonCode(ssCode);
		return subjectSon;
	}

	public List<SubjectSon> getAllSubjectSonBySubjectID(String subjectID) throws Exception {
		List<SubjectSon> subjectSons = subjectSonDAO.getAllSubjectSonBySubjectID(subjectID);
		return subjectSons;
	}

}
